123456/PO PHP H5/Yannick - Matteo/Racedetails.php

<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" href="style/style.css"> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <html><h1>Race gegevens</h1></html> <?php include('db2.php'); $RaceID = mysqli_real_escape_string($db, $_GET['RaceID']); $query = "SELECT r.*, re.* FROM Races r INNER JOIN Resultaten re ON r.RaceID = re.RaceID WHERE r.RaceID = '$RaceID'"; $result = mysqli_query($db, $query); while($row = mysqli_fetch_array($result)){ echo "<h2>{$row['RaceID']}</h2>"; echo "<div>{$row['RaceNaam']}</div>"; echo "<div>{$row['Curcuit']}</div>"; echo "<div>{$row['Datum']}</div>"; echo "<div>{$row['WinnaarID']}</div>"; echo "<div>{$row['ResultaatID']}</div>"; echo "<div>{$row['CoureurID']}</div>"; echo "<div>{$row['positie']}</div>"; echo "<div>{$row['punten']}</div>"; } ?> <button id="button" onclick="location.href='Auto.php'">Auto</button> <button id="button" onclick="location.href='Resultaten.php'">Resultaten</button> <button id="button" onclick="location.href='coureur.php'">coureur</button> <button id="button"onclick="location.href='Races.php'">terug</button> <button id="button" onclick="location.href='index.php'">homepagina</button> </body> </html>

Resultaat

Made by Thijs Aarnoudse